//-----------------------------------------------------------------------
// <copyright file="PresenceExtension.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Microsoft.Live.Messenger.Presence
{
    using System;
    using System.Text.RegularExpressions;

    /// <summary>
    ///     Base class for custom presence properties.
    /// </summary>
    public abstract class PresenceExtension
    {
        /// <summary>
        ///     Initializes a new <see cref="PresenceExtension"/> instance.
        /// </summary>
        /// <param name="name">The name of the property</param>
        protected PresenceExtension(string name)
        {
            throw new NotImplementedException();

            /*
            if (String.IsNullOrEmpty(name))
            {
                throw ExceptionHelper.CreateArgumentNullException("name");
            }

            if (name.Length > 6)
            {
                throw ExceptionHelper.CreateArgumentOutOfRangeException("name");
            }

            if (!Regex.IsMatch(name, "^[A-Za-z1-9]+$"))
            {
                throw ExceptionHelper.CreateArgumentOutOfRangeException("name");
            }

            this.Entity = MessengerEntity.CreateInstance(typeof(PresenceExtension), name);
            */
        }

        /// <summary>
        ///     The name of the property.
        /// </summary>
        /// <remarks>
        ///     The maximum length of a property name is 6 characters. The name may only
        ///     consist of alphanumeric characters (A..Z, 0..9).
        /// </remarks>
        public string Name
        {
            get { return null; }
        }
    }
}